{% extends "public/layout.html" %}

{% block css %}
    <style>
    .vote-title {
        margin-left: 1px;
        margin-top: 12px;
    }
    .vote-item{
        padding: 4px 15px;
    }
    .vote-icon {
        font-size:15px;
        margin-top:18px;
        color:#000;
    }
    </style>
{% endblock %}

{% block breadcrumb %}
     <ol class="breadcrumb">
        <li>
            <a href="{% url 'index' %}">首页</a>
        </li>
         <li>
             <a>项目管理</a>
         </li>
        <li class="active">
            <strong>我的项目</strong>
        </li>
    </ol>
{% endblock %}


{% block body %}
<div  class="wrapper wrapper-content animated fadeInRight">
<div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5> 我的项目 </h5>
                    </div>

                     <div class="ibox-content">
                        <div class="">
                            <a href="{% url 'project_add' %}" class="btn btn-sm btn-primary"> 添加项目 </a>
                            <a target="_blank" href="http://139.196.79.152:81" class="btn btn-sm btn-success pull-right">去GitLab</a>
                        </div>

                         {% for project in page_obj.object_list %}
                           <div class="vote-item">
                            <div class="row">
                                <div class="col-md-10">
                                    <a href="{{ project.http_url_to_repo }}" class="vote-title">
                                        {{ project.namespace.name }} /  {{ project.name }}
                                    </a><br>
                                        {{ project.description }}
                                </div>
                                <div class="col-md-2">
                                    <div class="vote-icon">
                                        <i class="fa fa-star" ></i><span style="padding:0 3px;">{{ project.star_count }}</span>
                                        {% if project.visibility_level == 0 %}
                                            <i class="fa fa-lock fa-fw" > </i>
                                        {% elif project.visibility_level == 10 %}
                                            <i class="fa fa-shield fa-fw" > </i>
                                        {% else %}
                                             <i class="fa fa-globe fa-fw" > </i>
                                        {% endif %}
                                    </div>
                                </div>
                            </div>
                        </div>
                        {% endfor %}

                    </div>
                    <div class="ibox-footer">
                       <div class="row">
                        <div class="col-sm-6">
                            <div class="dataTables_info" id="editable_info" role="status" aria-live="polite">
                                你总共有 [{{ p.count }}] 个项目
                            </div>
                        </div>
                        {% include 'public/paginator.html' %}
                    </div>
                </div>
            </div>
        </div>
    </div>



{% endblock %}

{% block js %}
<script>

</script>

{% endblock %}
